<?php
// Si le fichier de qui dÔøΩfinie les constantes n'a pas encore ÔøΩtÔøΩ appelÔøΩ on le charge
if (!defined('CONFIGURATION_FILE_LOADED'))
    include( 'includes/configuration_include.php');
    include( 'includes/regions.php');
    include( 'includes/id_regions.php');
		
include( PATH_VIEWS.'slide_view.php');
include(PATH_MODELS.'slide_model.php');






		
include( PATH_VIEWS.'update_work_view.php'); 
include( PATH_MODELS.'update_work_model.php');

$bdd= model_db_connexion();
$req =select_slide_model($bdd);
start_print_slide();
while ($donnees = $req->fetch( PDO::FETCH_ASSOC)){
$name_slide = $donnees['slide_name'];
$type_slide = $donnees['type'];
if($type_slide == 'news')
{ 
$req2 = select_targetnews_slide($bdd,$name_slide);
while ($donnees = $req2->fetch( PDO::FETCH_ASSOC)){
      
$id = $donnees['id_new'];
$type_img = $donnees['img_type'];
content_slide($id,$type_slide,$type_img);
}
}
if($type_slide =='works')
{
$req3 = select_targetworks_slide($bdd,$name_slide);
while ($donnees = $req3->fetch( PDO::FETCH_ASSOC)){
        

$id = $donnees['id_work'];
$type_img = $donnees['img_type'];

content_slide($id,$type_slide,$type_img);
}


}
}
end_print_slide();
    echo'<script type="text/javascript" src ="' . URL_JS . 'slide.js"  ></script>';

?>


        
        <style type="text/css"> 
        #leftControl {
  top:0;
  left:0;
  background:transparent url('<?php echo URL_IMG;?>slide/control_left.jpg') no-repeat 0 0;
}
#rightControl {
  top:0;
  right:0;
  background:transparent url('<?php echo URL_IMG;?>slide/control_right.jpg') no-repeat 0 0;
}</style>
        